# coding:utf-8
import time

from selenium import webdriver

import setting

wd = webdriver.Chrome(setting.WEBDRIVERURI)
wd.implicitly_wait(30)  # 隐匿等待

wd.get('https://www.csdn.net/')
# 强制等待
# time.sleep(2)


print(wd.find_element_by_link_text('首页').get_attribute('href'))

time.sleep(3)
wd.quit()
